xen/xsm: Generate the permission in a spec-compliant way
authorJulien Grall <julien.grall@linaro.org>
Fri, 20 Feb 2015 15:58:28 +0000 (15:58 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 24 Feb 2015 15:54:08 +0000 (15:54 +0000)
commit0b81a749a6cbbbbed7462e7b662485e799ac8fee
treeee90ccd68e1c84a531956771f6db72023236054e
parentf01eb36114c62ea79adba75f1fad906a2de90607
xen/xsm: Generate the permission in a spec-compliant way

Each class can contains 32 permisions which are encoded on a word (one
bit per permission).

Currently the awk script will generate an hexadecimal value for each
permission. This may result to generate an invalid value on some version
of awk.

For instance debian jessie is using a version of mawk where (1 << 31)
will result to 0x7fffffff.

This is because the awk specification requires to do the arithmetic with
float. So the resulting integer may vary following the implementation.

As the generated headers are only used by C code, generate the
permission define via "1UL << n".

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
xen/xsm/flask/policy/mkaccess_vector.sh